var monitors = function(t) {
  "use strict";
  var D = function() {
      return (D = Object.assign || function(t) {
          for (var n, e = 1, r = arguments.length; e < r; e++)
              for (var o in n = arguments[e])
                  Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
          return t
      }
      ).apply(this, arguments)
  };
  function _(t) {
      var n = "function" == typeof Symbol && Symbol.iterator
        , e = n && t[n]
        , r = 0;
      if (e)
          return e.call(t);
      if (t && "number" == typeof t.length)
          return {
              next: function() {
                  return {
                      value: (t = t && r >= t.length ? void 0 : t) && t[r++],
                      done: !t
                  }
              }
          };
      throw new TypeError(n ? "Object is not iterable." : "Symbol.iterator is not defined.")
  }
  function H(t, n) {
      var e = "function" == typeof Symbol && t[Symbol.iterator];
      if (!e)
          return t;
      var r, o, i = e.call(t), a = [];
      try {
          for (; (void 0 === n || 0 < n--) && !(r = i.next()).done; )
              a.push(r.value)
      } catch (t) {
          o = {
              error: t
          }
      } finally {
          try {
              r && !r.done && (e = i.return) && e.call(i)
          } finally {
              if (o)
                  throw o.error
          }
      }
      return a
  }
  function c(t, n, e) {
      if (e || 2 === arguments.length)
          for (var r, o = 0, i = n.length; o < i; o++)
              !r && o in n || ((r = r || Array.prototype.slice.call(n, 0, o))[o] = n[o]);
      return t.concat(r || Array.prototype.slice.call(n))
  }
  function o(t) {
      return Object.prototype.toString.call(t)
  }
  function a(t) {
      return "object" == typeof t && null !== t && !i(t)
  }
  function s(t) {
      return "function" == typeof t
  }
  function l(t) {
      return "[object String]" === Object.prototype.toString.call(t)
  }
  function i(t) {
      return "[object Array]" === Object.prototype.toString.call(t)
  }
  function u(t) {
      return "number" == typeof t
  }
  function f(t) {
      return "undefined" != typeof Event && function(t, n) {
          try {
              return t instanceof n
          } catch (t) {
              return
          }
      }(t, Event)
  }
  function n(t, n) {
      if (a(t))
          for (var e in t)
              r = e,
              Object.prototype.hasOwnProperty.call(t, r) && n.call(null, e, t[e]);
      var r
  }
  function m(t, n) {
      if (i(t) && 0 !== t.length)
          for (var e = 0; e < t.length; ) {
              if (t[e] === n)
                  return 1;
              e++
          }
  }
  function r() {
      return a(window) && !!a(window.performance)
  }
  function e() {
      return !(!s(window.requestAnimationFrame) || !s(window.cancelAnimationFrame))
  }
  function d() {
      return !!("setTimeout"in window && s(setTimeout))
  }
  function v(t) {
      var e, t = function(t) {
          if (!a(t))
              return {};
          var e = {};
          return n(t, function(t, n) {
              a(n) || i(n) ? e[t] = JSON.stringify(n) : e[t] = n
          }),
          e
      }(t), t = (e = {},
      n(t, function(t, n) {
          e[encodeURIComponent(t)] = encodeURIComponent(n)
      }),
      e), r = [];
      return n(t, function(t, n) {
          r.push(t + "=" + n)
      }),
      r.join("&")
  }
  function p(t) {
      var n = document.createElement("a");
      n.href = t;
      t = n.pathname || "/";
      return "/" !== t[0] && (t = "/" + t),
      {
          href: n.href,
          protocol: n.protocol.slice(0, -1),
          hostname: n.hostname,
          host: n.host,
          search: n.search,
          pathname: t,
          hash: n.hash
      }
  }
  function h() {}
  function U(t) {
      "complete" !== document.readyState ? window.addEventListener("load", function() {
          setTimeout(function() {
              t()
          }, 0)
      }, !1) : t()
  }
  var B = function(n, e) {
      s(n) && (s(window.addEventListener) && (window.addEventListener("unload", n),
      window.addEventListener("beforeunload", n),
      window.addEventListener("pagehide", n)),
      s(document.addEventListener) && document.addEventListener("visibilitychange", function(t) {
          s(e) ? e(t) : "hidden" === document.visibilityState && n(t)
      }))
  };
  function g() {
      return (new Date).getTime()
  }
  var y = (b.post = function(t, n, e) {
      var r = e && e.success || h
        , o = e && e.fail || h
        , e = new XMLHttpRequest;
      e.open("POST", t, !0),
      e.setRequestHeader("Content-Type", "application/json"),
      e.send(JSON.stringify(n)),
      e.onload = function() {
          try {
              var t;
              this.responseText ? (t = JSON.parse(this.responseText),
              r(t)) : r({})
          } catch (t) {
              o()
          }
      }
      ,
      e.onerror = function() {
          o()
      }
      ,
      e.onabort = function() {
          o()
      }
  }
  ,
  b.get = function(t, n) {
      var e = n && n.success || h
        , r = n && n.fail || h
        , o = n && n.getResponse || h
        , i = n && n.getResponseText || h
        , a = new XMLHttpRequest;
      n && n.withCredentials && (a.withCredentials = n.withCredentials),
      a.open("GET", t),
      a.send(),
      a.onload = function() {
          o(null == this ? void 0 : this.response),
          i(this.responseText);
          try {
              var t;
              this.responseText ? (t = JSON.parse(this.responseText),
              e(t)) : e({})
          } catch (t) {
              r()
          }
      }
      ,
      a.onerror = function() {
          r()
      }
      ,
      a.onabort = function() {
          r()
      }
  }
  ,
  b.prototype.getCommonParams = function() {
      return {
          timestamp: Date.now()
      }
  }
  ,
  b);
  function b(t) {
      var n = this;
      this.postEvent = function(t) {
          t = D(D({}, t), n.getCommonParams());
          b.post(n.url, t)
      }
      ,
      this.getEvent = function(t) {
          t = v(D(D({}, t), n.getCommonParams())),
          t = n.url + "?" + t;
          b.get(t)
      }
      ,
      this.getURL = function() {
          return n.url
      }
      ,
      this.options = t,
      this.url = this.options.reportURL
  }
  function q(t) {
      return t
  }
  var Q = function(e) {
      return function(t) {
          for (var n = 0; n < e.length; ) {
              if (e[n][0](t))
                  return e[n][1](t);
              n += 1
          }
      }
  }
    , z = function(n) {
      return function(t) {
          return n === t
      }
  }
    , w = function() {
      return s(Date) ? Math.round(Date.now() / 1e3) : 0
  };
  function S(t, e) {
      if (!a(t))
          return {};
      if (!s(e))
          return {};
      var r = {};
      return n(t, function(t, n) {
          e(n) && (r[t] = n)
      }),
      r
  }
  function E(t) {
      var n, e, r, o, i = null;
      return a(t) ? ("timer" === t.type && (i = a(n = t.event) && l(n.name) && u(n.value) ? {
          metrics_type: "timer",
          event_name: "default",
          metrics: ((e = {})[n.name] = n.value,
          e),
          category: S(n.tags, l),
          timestamp: w()
      } : {}),
      "counter" === t.type && (i = a(o = t.event) && l(o.name) && u(o.value) ? {
          metrics_type: "counter",
          event_name: "default",
          metrics: ((r = {})[o.name] = o.value,
          r),
          category: S(o.tags, l),
          timestamp: w()
      } : {}),
      "log" === t.type && (i = a(r = t.event) && l(r.value) ? {
          metrics_type: "log",
          event_name: "default",
          log_content: r.value,
          log_level: null !== (o = r.level) && void 0 !== o ? o : "info",
          category: S(r.tags, l),
          timestamp: w()
      } : {}),
      "custom" === t.type ? a(t = t.event) && l(t.event_name) ? {
          metrics_type: "custom",
          event_name: t.event_name,
          metrics: S(t.metrics, u),
          category: S(t.tags, l),
          timestamp: w()
      } : {} : i) : i
  }
  var G = function(r) {
      function o() {
          for (var t = [], n = 0; n < arguments.length; n++)
              t[n] = arguments[n];
          var e = r.apply(void 0, c([], H(t), !1));
          return o.returns = e,
          o.resolved = !0,
          o.subs && o.subs.forEach(function(t) {
              return t()
          }),
          e
      }
      return o.then = V(o).then,
      o
  }
    , V = function() {
      for (var n = [], t = 0; t < arguments.length; t++)
          n[t] = arguments[t];
      function a() {
          return n.every(function(t) {
              return t.resolved
          })
      }
      return Object.defineProperty({
          then: function(e) {
              function r() {
                  return t.apply(void 0, c([], H(n.map(function(t) {
                      return t.returns
                  })), !1))
              }
              var o, i, t = G(function() {
                  for (var t = [], n = 0; n < arguments.length; n++)
                      t[n] = arguments[n];
                  return i ? o : (i = !0,
                  o = e.apply(void 0, c([], H(t), !1)))
              });
              return a() ? setTimeout(r) : n.forEach(function(t) {
                  function n() {
                      return a() && r()
                  }
                  t.subs ? t.subs.push(n) : t.subs = [n]
              }),
              V(t)
          }
      }, "resolved", {
          get: a
      })
  };
  function L(t) {
      try {
          for (var n, e = t, r = [], o = 0, i = 0, a = " > ".length; e && o++ < 5 && !("html" === (n = function(t) {
              var n, e, r, o, i = t, a = [];
              if (!i || !i.tagName)
                  return "";
              a.push(i.tagName.toLowerCase()),
              i.id && a.push("#" + i.id);
              t = i.className;
              if (t && l(t))
                  for (n = t.split(/\s+/),
                  o = 0; o < n.length; o++)
                      a.push("." + n[o]);
              var u = ["type", "name", "title", "alt"];
              for (o = 0; o < u.length; o++)
                  e = u[o],
                  (r = i.getAttribute(e)) && a.push("[" + e + '="' + r + '"]');
              return a.join("")
          }(e)) || 1 < o && 80 <= i + r.length * a + n.length); )
              r.push(n),
              i += n.length,
              e = e.parentNode;
          return r.reverse().join(" > ")
      } catch (t) {
          return "<unknown>"
      }
  }
  function M() {
      try {
          return new Headers,
          new Request(""),
          new Response,
          window.fetch
      } catch (t) {}
  }
  function T() {
      if (a(window))
          return window
  }
  function k() {
      if (a(document))
          return document
  }
  function C() {
      if (T() && a(window.performance))
          return window.performance
  }
  function R() {
      if (T() && s(window.MutationObserver))
          return window.MutationObserver
  }
  function P() {
      if (T() && s(window.PerformanceObserver))
          return window.PerformanceObserver
  }
  function A(i, a, u) {
      return function() {
          for (var t = [], n = 0; n < arguments.length; n++)
              t[n] = arguments[n];
          if (!i)
              return h;
          var e = i[a]
            , r = u.apply(void 0, c([e], H(t), !1))
            , o = r;
          return s(o) && (o = function() {
              for (var n = [], t = 0; t < arguments.length; t++)
                  n[t] = arguments[t];
              try {
                  return r.apply(this, n)
              } catch (t) {
                  return s(e) && e.apply(this, n)
              }
          }
          ),
          i[a] = o,
          function(t) {
              t && o !== i[a] || (i[a] = e)
          }
      }
  }
  function W(t, n, e, r) {
      void 0 === n && (n = {}),
      void 0 === r && (r = []);
      try {
          var o = t.apply(void 0, c([], H(r), !1));
          return o && o(n, e) || []
      } catch (t) {
          return []
      }
  }
  function X(l, f, m) {
      var t;
      return void 0 === l && (l = k()),
      void 0 === f && (f = R()),
      void 0 === m && (m = null === (t = function() {
          var t = C();
          if (t && a(t.timing))
              return t.timing
      }()) || void 0 === t ? void 0 : t.navigationStart),
      function(t, e) {
          function n() {
              return o.push({
                  time: Date.now() - r,
                  score: tt(l && l.body, 1, !1, i)
              })
          }
          var r = Date.now()
            , o = []
            , i = Z.concat(t.ignoreTags || [])
            , a = H(J(!0), 1)[0]
            , u = H(I(f, function() {
              return a(n)
          }), 2)
            , s = u[0]
            , c = u[1]
            , t = function(t) {
              void 0 === t && (t = 0),
              c();
              var n = nt(o)
                , t = $(n ? n + t : 0);
              return e && e(t),
              t
          }
            , u = r - (m || 0);
          return s(l, {
              subtree: !0,
              childList: !0
          }),
          [c, t, t.bind(null, u)]
      }
  }
  function x(t, a) {
      var u = ["img", "script", "iframe", "link", "audio", "video", "source"]
        , n = (t = H(I(t, function(t) {
          var n, e;
          try {
              for (var r = _(t), o = r.next(); !o.done; o = r.next()) {
                  var i = o.value;
                  ("childList" === i.type && function t(n, e) {
                      var r, o;
                      try {
                          for (var i = _(n), a = i.next(); !a.done; a = i.next()) {
                              var u = a.value;
                              if (m(e, u.nodeName.toLowerCase()) || u.children && t(u.children, e))
                                  return 1
                          }
                      } catch (t) {
                          r = {
                              error: t
                          }
                      } finally {
                          try {
                              a && !a.done && (o = i.return) && o.call(i)
                          } finally {
                              if (r)
                                  throw r.error
                          }
                      }
                  }(i.addedNodes, u) || "attributes" === i.type && m(u, i.target.nodeName.toLowerCase())) && a(i)
              }
          } catch (t) {
              n = {
                  error: t
              }
          } finally {
              try {
                  o && !o.done && (e = r.return) && e.call(r)
              } finally {
                  if (n)
                      throw n.error
              }
          }
      }), 2))[0];
      return [function() {
          return n(document, {
              attributes: !0,
              childList: !0,
              subtree: !0,
              attributeFilter: ["href", "src"]
          })
      }
      , t[1]]
  }
  function N(e) {
      return function() {
          for (var t = [], n = 0; n < arguments.length; n++)
              t[n] = arguments[n];
          return this._method = t[0],
          e.apply(this, t)
      }
  }
  function O(r, o, i) {
      var a = 0;
      return function() {
          for (var t = [], n = 0; n < arguments.length; n++)
              t[n] = arguments[n];
          if ("GET" !== this._method)
              return r.apply(this, t);
          var e = a += 2;
          return o(e, Date.now()),
          A(this, "onreadystatechange", function(n) {
              return function(t) {
                  n && n.call(this, t),
                  4 === this.readyState && i(e)
              }
          })(),
          r.apply(this, t)
      }
  }
  function j(i, a, u) {
      var s = 1;
      return function() {
          for (var t, o = [], n = 0; n < arguments.length; n++)
              o[n] = arguments[n];
          return "GET" !== ((null === (t = o[0]) || void 0 === t ? void 0 : t.method) || (null === (t = o[1]) || void 0 === t ? void 0 : t.method) || "GET") ? i.apply(void 0, c([], H(o), !1)) : new Promise(function(n, e) {
              var r = s += 2;
              a(r, Date.now()),
              i.apply(void 0, c([], H(o), !1)).then(function(t) {
                  u(r),
                  n(t)
              }, function(t) {
                  u(r, t),
                  e(t)
              })
          }
          )
      }
  }
  function Y(b, w, S, E, L) {
      return void 0 === b && (b = function() {
          if (s(XMLHttpRequest))
              return XMLHttpRequest
      }()),
      void 0 === w && (w = M() && T()),
      void 0 === S && (S = P()),
      void 0 === E && (E = R()),
      void 0 === L && (L = C()),
      function(t, n, e) {
          function r() {
              d(),
              h(),
              e && e(),
              s && s.disconnect(),
              u.length = 0
          }
          var o = t.prePerformanceObserver
            , i = t.isAsync
            , i = void 0 === i ? 0 : i
            , t = t.minValue
            , a = void 0 === t ? null : t
            , t = o || {}
            , o = t.precollect
            , u = void 0 === o ? [] : o
            , s = t.observer
            , t = H(K(L), 5)
            , c = t[0]
            , l = t[1]
            , f = t[4]
            , t = H(et(l), 3)
            , m = t[0]
            , d = t[1]
            , v = t[2]
            , i = H(it(w, b, S, E)(i ? [] : u, v, l), 3)
            , p = i[0]
            , h = i[1]
            , g = i[2]
            , y = function(t) {
              var n = f("first-contentful-paint")[0]
                , n = ot((n ? n.startTime : rt(c)) || 0, a || rt(c) || 0, g(), l() + (t ? 0 : 5e3), p);
              return t ? n ? (r(),
              void t(Math.round(n))) : v(l() + 1e3) : (r(),
              n)
          };
          return [function(t) {
              if (p.notSupport)
                  return t();
              var n = p[p.length - 1];
              m(function() {
                  return y(t)
              }, Math.max(g() + 5e3, n ? n.end : 0))
          }
          , p, v, function() {
              return !p.notSupport && y() || 0
          }
          ]
      }
  }
  var I = function(t, n) {
      var e = t && new t(n);
      return [function(t, n) {
          e && t && e.observe(t, n)
      }
      , function() {
          return e && e.disconnect()
      }
      ]
  }
    , F = function(e, o, n, i) {
      var r = e && new e(function(t, r) {
          t.getEntries ? t.getEntries().forEach(function(t, n, e) {
              return o(t, n, e, r)
          }) : i && i(),
          n && r.disconnect()
      }
      );
      return [function() {
          for (var n = [], t = 0; t < arguments.length; t++)
              n[t] = arguments[t];
          if (!e || !r)
              return i && i();
          try {
              n.forEach(function(t) {
                  return -1 < e.supportedEntryTypes.indexOf(t) ? r.observe({
                      type: t,
                      buffered: !0
                  }) : void (i && i())
              })
          } catch (t) {
              try {
                  r.observe({
                      entryTypes: n
                  })
              } catch (t) {
                  i && i()
              }
          }
      }
      , function() {
          return r && r.disconnect()
      }
      ]
  }
    , K = function(e) {
      var t = e && e.timing || void 0;
      return [t, function() {
          return e && e.now ? e.now() : (Date.now ? Date.now() : +new Date) - (t && t.navigationStart || 0)
      }
      , function(t) {
          var n = (e || {}).getEntriesByType;
          return s(n) && n.call(e, t) || []
      }
      , function() {
          var t = (e || {}).clearResourceTimings;
          s(t) && t.call(e)
      }
      , function(t) {
          var n = (e || {}).getEntriesByName;
          return s(n) && n.call(e, t) || []
      }
      ]
  }
    , J = function(t) {
      var n, e = window.requestAnimationFrame, r = window.cancelAnimationFrame, o = !s(e) || t && document && document.hidden ? function(t) {
          return t(0),
          0
      }
      : e, i = s(r) ? r : h;
      return [function(t) {
          n && i(n),
          n = o(t)
      }
      , o, i]
  }
    , Z = ["SCRIPT", "STYLE", "META", "HEAD"]
    , $ = function(t) {
      return {
          name: "FMPMonitor",
          type: "post",
          event: {
              ev_type: "fmp",
              fmp: t
          }
      }
  }
    , tt = function(t, e, n, r) {
      if (!t || -1 < r.indexOf(t.tagName))
          return 0;
      var o = t.children
        , o = [].slice.call(void 0 === o ? [] : o).reduceRight(function(t, n) {
          return t + tt(n, e + 1, 0 < t, r)
      }, 0);
      if (o <= 0 && !n) {
          if (!s(t.getBoundingClientRect))
              return 0;
          n = t.getBoundingClientRect() || {},
          t = n.top,
          n = n.height;
          if (t > window.innerHeight || n <= 0)
              return 0
      }
      return o + 1 + .5 * e
  }
    , nt = function(t) {
      var n = H(void 0 === t ? [] : t)
        , t = n[0]
        , n = n.slice(1);
      return n && n.reduce(function(t, n) {
          var e = H(t, 2)
            , r = e[0]
            , t = e[1]
            , e = n.score - r.score;
          return [n, n.time >= r.time && t.rate < e ? {
              time: n.time,
              rate: e
          } : t]
      }, [t, {
          time: null == t ? void 0 : t.time,
          rate: 0
      }])[1].time || 0
  }
    , et = function(n) {
      function e(t) {
          t < o || !r || (a(),
          i = window.setTimeout(r, t - n()),
          o = t)
      }
      var r, o = -1 / 0, i = void 0, a = function() {
          return window.clearTimeout(i)
      };
      return [function(t, n) {
          r = t,
          e(n)
      }
      , function() {
          a(),
          r = void 0
      }
      , e]
  }
    , rt = function(t) {
      var n = t || {}
        , t = n.domContentLoadedEventEnd
        , n = n.navigationStart;
      return t ? t - (void 0 === n ? 0 : n) : null
  }
    , ot = function(t, n, e, r, o) {
      if (r - e < 5e3)
          return null;
      o = 0 === o.length ? t : o[o.length - 1].end;
      return r - o < 5e3 ? null : Math.max(o, n)
  }
    , it = function(E, L, M, T) {
      return function(t, e, n) {
          var s, c, r, o, i, a, u, l, f = H([s = [], c = [], function(a, u) {
              return function(t) {
                  var n = t.startTime
                    , e = t.duration
                    , r = t.fetchStart
                    , o = t.responseEnd
                    , i = t.entryType;
                  "longtask" === i ? (s.push({
                      start: n,
                      end: n + e
                  }),
                  a && a(t)) : "resource" === i && (c.push({
                      start: r,
                      end: o
                  }),
                  u && u(t))
              }
          }
          ], 3), m = f[0], d = f[1], v = f[2], p = H((r = E,
          o = L,
          p = H([i = {}, function(t, n) {
              return i[t] = n
          }
          , function(t) {
              return delete i[t]
          }
          ], 3),
          y = p[0],
          f = p[1],
          p = p[2],
          a = o && A(o.prototype, "open", N)(),
          u = o && A(o.prototype, "send", O)(f, p),
          l = r && A(r, "fetch", j)(f, p),
          [y, function() {
              a && a(!0),
              u && u(!0),
              l && l(!0)
          }
          ]), 2), h = p[0], g = p[1], y = H(x(T, function() {
              return e(n() + 5e3)
          }) || [], 2), p = y[0], b = y[1];
          p && p();
          function w() {
              return function(t, n, e) {
                  var r, o, i, a;
                  if (2 < t.length)
                      return e();
                  var u = [];
                  try {
                      for (var s = _(n), c = s.next(); !c.done; c = s.next()) {
                          var l = c.value;
                          u.push([l.start, 0], [l.end, 1])
                      }
                  } catch (t) {
                      r = {
                          error: t
                      }
                  } finally {
                      try {
                          c && !c.done && (o = s.return) && o.call(s)
                      } finally {
                          if (r)
                              throw r.error
                      }
                  }
                  try {
                      for (var f = _(t), m = f.next(); !m.done; m = f.next()) {
                          var d = m.value;
                          u.push([d, 0])
                      }
                  } catch (t) {
                      i = {
                          error: t
                      }
                  } finally {
                      try {
                          m && !m.done && (a = f.return) && a.call(f)
                      } finally {
                          if (i)
                              throw i.error
                      }
                  }
                  u.sort(function(t, n) {
                      return t[0] - n[0]
                  });
                  for (var v = t.length, p = u.length - 1; 0 <= p; p--) {
                      var h = H(u[p], 2)
                        , g = h[0];
                      switch (h[1]) {
                      case 0:
                          v--;
                          break;
                      case 1:
                          if (2 < ++v)
                              return g
                      }
                  }
                  return 0
              }(function(t) {
                  for (var n = Object.keys(t), e = [], r = 0; r < n.length; r++) {
                      var o = t[n[r]];
                      "number" == typeof o && e.push(o)
                  }
                  return e
              }(h), d, n)
          }
          var y = H(F(M, v(function(t) {
              var n = t.startTime
                , t = t.duration;
              return e(n + t + 5e3)
          }, function() {
              return e(w() + 5e3)
          }), !1, function() {
              return m.notSupport = !0
          }), 2)
            , p = y[0]
            , S = y[1];
          return p("longtask", "resource"),
          t.forEach(v()),
          [m, function() {
              g(),
              S(),
              b && b()
          }
          , w]
      }
  };
  function at() {
      return Date.now()
  }
  function ut(t) {
      this.beginTime = at(),
      this.frames = 0,
      this.duration = null != t ? t : 1e3,
      this.currentTime = at()
  }
  var st, ct = (ut.prototype.begin = function() {
      this.currentTime = at(),
      this.beginTime = at(),
      this.frames = 0
  }
  ,
  ut.prototype.frame = function() {
      return this.currentTime = at(),
      this.currentTime - this.beginTime
  }
  ,
  ut.prototype.end = function() {
      var t;
      return this.frames++,
      this.currentTime = at(),
      this.currentTime >= this.beginTime + this.duration && (t = this.frames * this.duration / (this.currentTime - this.beginTime),
      this.beginTime = this.currentTime,
      this.frames = 0),
      t
  }
  ,
  ut);
  (en = st = st || {}).once = "once",
  en.repeat = "repeat",
  en.frame = "frame";
  var lt = "FPSMonitor"
    , ft = (mt.prototype.setup = function(t) {
      e() && (this.fpsInstance = new ct(1e3),
      this.callback = t || h,
      this.fpsInstance.begin(),
      this.mode !== st.repeat ? this.mode !== st.frame ? this.mode === st.once && this.animateOnce() : this.animateId = requestAnimationFrame(this.animateFrame.bind(this)) : this.animateRepeat())
  }
  ,
  mt.prototype.animateRepeat = function() {
      var t;
      e() && (void 0 !== (t = this.fpsInstance.end()) && (this.fpsList.push(t),
      this.sendFps(t)),
      this.animateId = requestAnimationFrame(this.animateRepeat))
  }
  ,
  mt.prototype.animateOnce = function() {
      if (e()) {
          var t = this.fpsInstance.end();
          if (void 0 !== t)
              return this.fpsList.push(t),
              this.sendFps(t),
              void (this.fpsList.length >= Math.floor(this.onceTime / 1e3) && cancelAnimationFrame(this.animateId));
          this.animateId = requestAnimationFrame(this.animateOnce)
      }
  }
  ,
  mt.prototype.animateFrame = function() {
      var t;
      !e() || void 0 !== (t = this.fpsInstance.frame()) && (this.sendFrame(t),
      cancelAnimationFrame(this.animateId))
  }
  ,
  mt.prototype.sendFps = function(t) {
      s(this.callback) && this.callback({
          name: this.name,
          type: "post",
          event: {
              ev_type: "fps",
              fps: t
          }
      })
  }
  ,
  mt.prototype.sendFrame = function(t) {
      s(this.callback) && this.callback({
          name: this.name,
          type: "post",
          event: {
              ev_type: "frame_duration",
              frame: t
          }
      })
  }
  ,
  mt.monitorName = lt,
  mt);
  function mt(t) {
      var n, e = this;
      this.name = lt,
      this.callback = h,
      this.fpsInstance = null,
      this.animateId = 0,
      this.fpsList = [],
      this.mode = "once",
      this.onceTime = 1e3,
      this.getFps = function() {
          return e.fpsList
      }
      ,
      t && (this.mode = null !== (n = t.mode) && void 0 !== n ? n : st.once,
      this.onceTime = null !== (t = t.onceTime) && void 0 !== t ? t : 1e3)
  }
  var dt = "FPSJankTimesMonitor"
    , vt = (pt.prototype.setup = function(t) {
      void 0 === t && (t = h),
      d() && (this.callback = t,
      this.start())
  }
  ,
  pt.prototype.getHistoryFrameList = function() {
      return this.historyFrameList
  }
  ,
  pt.prototype.start = function() {
      this.fpsMonitor.setup(this.getFrameList.bind(this))
  }
  ,
  pt.prototype.getFrameList = function(t) {
      var n = this
        , e = t.event.frame
        , r = this.frameList.length
        , o = {
          frame: e,
          isJank: 100 < e,
          timestamp: g()
      };
      this.historyFrameList.push(o),
      this.historyFrameList.length > (this.options.maxFrameListCount || 30) && this.historyFrameList.shift();
      var i = this.frameList[r - 1] || {}
        , t = o.isJank && !i.isJank
        , e = !o.isJank && i.isJank
        , r = o.isJank && i.isJank
        , i = !o.isJank && !i.isJank;
      t || e || r ? this.frameList.push(o) : i && (this.frameList = [o]),
      e && (this.report(),
      this.frameList = [o]),
      this.timerId = window.setTimeout(function() {
          n.start()
      }, 100)
  }
  ,
  pt.prototype.shouldReport = function(t) {
      for (var n = 0, e = 0; e < t.length; e++) {
          var r = t[e];
          if (200 < r.frame)
              return !0;
          if (r.isJank && n++,
          3 <= n)
              return !0
      }
      return !1
  }
  ,
  pt.prototype.report = function() {
      var t;
      this.shouldReport(this.frameList) && (t = {
          name: this.name,
          type: "post",
          event: {
              ev_type: "fps_jank_times",
              list: this.frameList,
              breadcrumbs: null !== (t = null === (t = this.breadcrumbMonitor) || void 0 === t ? void 0 : t.getBreadcrumbs()) && void 0 !== t ? t : [],
              memory: null !== (t = null === (t = this.memoryRecordMonitor) || void 0 === t ? void 0 : t.getMemoryQueue()) && void 0 !== t ? t : []
          }
      },
      this.callback(t))
  }
  ,
  pt.monitorName = dt,
  pt);
  function pt(t) {
      var e = this;
      this.name = dt,
      this.historyFrameList = [],
      this.callback = h,
      this.onLeave = function() {
          var t, n;
          d() && (1 < e.frameList.length && (e.report(),
          null !== (n = (t = e.options).report) && void 0 !== n && n.call(t)),
          e.frameList = [],
          window.clearTimeout(e.timerId))
      }
      ,
      this.onShow = function() {
          d() && (e.historyFrameList = [],
          e.frameList = [],
          e.start())
      }
      ,
      this.visibilityChange = function() {
          "hidden" === document.visibilityState && e.onLeave(),
          "visible" === document.visibilityState && e.onShow()
      }
      ,
      t.breadcrumbMonitor && (this.breadcrumbMonitor = t.breadcrumbMonitor),
      t.memoryRecordMonitor && (this.memoryRecordMonitor = t.memoryRecordMonitor),
      this.options = null != t ? t : {},
      this.fpsMonitor = new ft({
          mode: "frame"
      }),
      this.frameList = [],
      this.timerId = 0,
      B(this.onLeave, this.visibilityChange)
  }
  function ht(n, o) {
      return void 0 === n && (n = P()),
      void 0 === o && (o = C()),
      function(t, e) {
          var r = H(K(o), 3)[2];
          return (0,
          H(F(n, function(t) {
              var n = t.processingStart
                , t = t.startTime;
              return e && e({
                  name: Lt,
                  fid: Math.round(n - t)
              })
          }, !0), 1)[0])(Et),
          [function() {
              var t = r(Et)[0] || {}
                , n = t.processingStart
                , t = t.startTime;
              return t ? Math.round(n - t) : 0
          }
          ]
      }
  }
  function gt(u) {
      return void 0 === u && (u = P()),
      function(t, n) {
          var e = t.prePerformanceObserver
            , r = 0;
          (e.precollect || []).forEach(function(t) {
              var n = t.entryType
                , t = t.startTime;
              n === Mt && (r = t)
          });
          var t = H(F(u, function(t) {
              t = t.startTime;
              r = t
          }), 2)
            , e = t[0]
            , o = t[1];
          e(Mt);
          var i = function() {
              o(),
              _t.forEach(function(t) {
                  window.removeEventListener(t, a, !0)
              })
          }
            , a = function() {
              n && n({
                  name: Tt,
                  lcp: r
              }),
              i()
          };
          _t.forEach(function(t) {
              window.addEventListener(t, a, !0)
          }),
          B(i);
          return [function() {
              return {
                  lcp: r
              }
          }
          ]
      }
  }
  function yt(a) {
      return void 0 === a && (a = P()),
      function(t) {
          var n = []
            , e = t.isAsync
            , r = t.prePerformanceObserver
            , o = H(F(a, function(t) {
              return n.push(t)
          }), 2)
            , t = o[0]
            , i = o[1];
          return !e && r && (r.precollect || []).forEach(function(t) {
              "longtask" === t.entryType && n.push(t)
          }),
          t("longtask"),
          [function() {
              i();
              var t = n.reduce(function(t, n) {
                  n = n.duration;
                  return t < n ? n : t
              }, 0);
              return kt(Math.round(t))
          }
          ]
      }
  }
  function bt(o, u) {
      return void 0 === o && (o = P()),
      void 0 === u && (u = C()),
      function(t, i) {
          function n() {
              var t = e(Pt);
              return {
                  fp: At(Rt, t),
                  fcp: At(Ct, t)
              }
          }
          var a = {}
            , e = H(K(u), 3)[2]
            , r = n();
          return r.fcp && r.fp ? i && i(r) : (0,
          H(F(o, function(t, n, e, r) {
              var o = t.name
                , t = t.startTime;
              a[o] = Math.round(t),
              a[Rt] && a[Ct] && (i && i({
                  fp: a[Rt],
                  fcp: a[Ct]
              }),
              r.disconnect())
          }, !1, function() {
              return i && i(n())
          }), 1)[0])(Pt),
          [n]
      }
  }
  function wt(s, c) {
      return void 0 === s && (s = C()),
      void 0 === c && (c = P()),
      function(t, n) {
          function r(t) {
              (t = xt(t, i)) && n && n(t)
          }
          var e = (t = void 0 === t ? {} : t).isAsync
            , o = void 0 === e ? 0 : e
            , e = t.observe
            , e = void 0 !== e && e
            , i = t.checkIgnore
            , t = H(K(s), 4)
            , a = t[2]
            , t = t[3]
            , u = function() {
              return a("resource")
          };
          return o && t(),
          e && (r(u()),
          (0,
          H(F(c, function(t, n, e) {
              return 0 === n && r(e)
          }), 1)[0])("resource")),
          [function() {
              return xt(u())
          }
          ]
      }
  }
  function St(t) {
      var n = D({}, t);
      return [function(t) {
          t = (n = t ? D(D({}, n), t) : n).fmp;
          n.fmp = t ? Math.max(Math.round(t), n.fcp || 0) : void 0
      }
      , function() {
          return jt(n)
      }
      , function(t) {
          return n = D({}, t)
      }
      ]
  }
  var Et = "first-input"
    , Lt = "FIDMonitor"
    , Mt = "largest-contentful-paint"
    , Tt = "LCPMonitor"
    , _t = ["keydown", "click"]
    , kt = function(t) {
      return {
          name: "MPFIDMonitor",
          mpfid: t
      }
  }
    , Ct = "first-contentful-paint"
    , Rt = "first-paint"
    , Pt = "paint"
    , At = function(n, t) {
      t = t.filter(function(t) {
          return t.name === n
      })[0];
      return t ? Math.round(t.startTime) : 0
  }
    , xt = function(t, n) {
      var e = [];
      if (t.forEach(function(t) {
          s(n) && n(t) || e.push(t)
      }),
      e.length)
          return {
              name: "ResourcePerformanceMonitor",
              type: "post",
              event: {
                  ev_type: "resource_performance",
                  resources: e
              }
          }
  }
    , Nt = {
      ev_type: "perf",
      isAsync: 0,
      dns: 0,
      tcp: 0,
      request: 0,
      response: 0,
      processing: 0,
      blank: 0,
      domready: 0,
      load: 0,
      has_resource: 0,
      domparse: 0,
      resource: 0,
      ttfb: 0,
      redirect: 0,
      tti: 0,
      upload_reason: "sample",
      network_type: "",
      timing: {},
      navigation_timing: {},
      navigation: {},
      resources: []
  }
    , Ot = "PerformanceMonitor"
    , jt = function(t) {
      return {
          name: Ot,
          type: "post",
          event: t
      }
  }
    , It = "StaticErrorMonitor";
  function Ft(t, n, e) {
      n = n || window.event || {};
      try {
          r = n.target || n.srcElement || {}
      } catch (t) {
          return
      }
      if (l(n = r.tagName)) {
          var r = Jt(r);
          if (r && r !== e)
              return {
                  name: It,
                  type: "get",
                  event: Dt(r, n.toLowerCase(), t)
              }
      }
  }
  var Jt = function(t) {
      return t = "link" === (n = t).tagName.toLowerCase() ? "href" : "src",
      s(n.getAttribute) ? n.getAttribute(t) || "" : n[t] || "";
      var n
  }
    , Dt = function(t, n, e) {
      var r = p(t)
        , t = {
          ev_type: "static",
          st_type: n,
          st_src: t,
          st_protocol: r.protocol,
          st_domain: r.hostname,
          st_path: r.pathname
      }
        , e = e && function(t, n) {
          var e = n.length;
          if (e)
              for (var r = e - 1; -1 < r; r--) {
                  var o = n[r];
                  if (o.name === t)
                      return o
              }
      }(r.href, e);
      return e && (t.timing = e),
      t
  }
    , Ht = "StaticSRIErrorMonitor";
  function Ut(i, n, a, e) {
      return function(o) {
          var t;
          s(a.all) && a.all([e(o, {
              cache: "force-cache"
          }).then(function(t) {
              return t.ok ? t : new Response
          }), (t = o + "?vt=" + Date.now(),
          e(t, {
              cache: "no-store"
          }).then(function(t) {
              return t.ok ? t : new Response
          }))]).then(function(t) {
              var t = H(t, 2)
                , e = t[0]
                , r = t[1];
              if (200 === e.status && 200 === r.status)
                  return a.all([e.text(), r.text()]).then(function(t) {
                      var n = t[0] || e.status + "," + r.status;
                      return [n.length, t[1].length, n, o]
                  })
          }).then(function(t) {
              var n, e, r;
              t && i && (e = (n = H(t, 3))[0],
              r = n[1],
              n[2] && e !== r && i({
                  name: Ht,
                  type: "get",
                  event: Bt.apply(void 0, c([], H(t), !1))
              }))
          }).catch(function(t) {
              n && n(t)
          })
      }
  }
  var Bt = function(t, n, e, r) {
      return {
          ev_type: "static_sri",
          sri: {
              error_file_size: t,
              real_file_size: n,
              error_file_context: e,
              static_file_src: r,
              static_file_url: p(r).href || ""
          }
      }
  }
    , qt = function(t) {
      return s(t.getAttribute) ? t.getAttribute("src") : t.src || t.href || ""
  }
    , Qt = function(t) {
      return s(t.getAttribute) ? !!t.getAttribute("integrity") : !!t.integrity
  }
    , zt = "MemoryRecordMonitor"
    , Gt = (Vt.prototype.reportInternal = function() {
      var t = window.performance.memory;
      this.add({
          jsHeapSizeLimit: t.jsHeapSizeLimit,
          totalJSHeapSize: t.totalJSHeapSize,
          usedJSHeapSize: t.usedJSHeapSize,
          timestamp: g()
      })
  }
  ,
  Vt.prototype.start = function() {
      this.reportInternal()
  }
  ,
  Vt.prototype.add = function(t) {
      this.memoryQueue.length >= this.maxQueue && this.memoryQueue.shift(),
      this.memoryQueue.push(t),
      this.emit && this.emit()
  }
  ,
  Vt.monitorName = zt,
  Vt);
  function Vt(t) {
      var n, e = this;
      this.name = zt,
      this.emit = null,
      this.timeInstance = null,
      this.isUnavailable = function() {
          return !(r() && window.performance.memory && d())
      }
      ,
      this.setup = function() {
          e.isUnavailable() || (e.timeInstance = window.setInterval(function() {
              e.start()
          }, e.timeout))
      }
      ,
      this.report = function() {
          return e.memoryQueue.map(function(t) {
              return D({}, t)
          })
      }
      ,
      this.getMemoryQueue = function() {
          return e.memoryQueue
      }
      ,
      this.onLeave = function() {
          e.isUnavailable() || (e.timeInstance && (window.clearInterval(e.timeInstance),
          e.timeInstance = null),
          e.memoryQueue = [])
      }
      ,
      this.onShow = function() {
          e.isUnavailable() || (e.memoryQueue = [],
          e.timeInstance = window.setInterval(function() {
              e.start()
          }, e.timeout))
      }
      ,
      this.visibilityChange = function() {
          "hidden" === document.visibilityState && e.onLeave(),
          "visible" === document.visibilityState && e.onShow()
      }
      ,
      this.timeout = null !== (n = null == t ? void 0 : t.interval) && void 0 !== n ? n : 1e3,
      this.maxQueue = null !== (t = null == t ? void 0 : t.maxQueue) && void 0 !== t ? t : 10,
      this.memoryQueue = [],
      B(this.onLeave, this.visibilityChange)
  }
  var Wt = "EmitMonitor"
    , Xt = (Yt.prototype.setup = function(t) {
      this.callback = t || h
  }
  ,
  Yt.prototype.buildCustomTimeLog = function(t, n, e) {
      return function(t) {
          var n = t.name
            , e = t.tag
            , t = t.value;
          if (n && t) {
              t = {
                  ev_type: "custom",
                  cm_name: n = s(n.toString) ? n.toString() : "",
                  cm_type: "time",
                  cm_value: t = +t
              };
              return e && (e = s(e.toString) ? e.toString() : "",
              t.cm_tag = e),
              {
                  name: "SentCustomTime",
                  type: "get",
                  event: t
              }
          }
      }({
          name: t,
          tag: n,
          value: e
      })
  }
  ,
  Yt.prototype.buildCustomCountLog = function(t, n) {
      return function(t) {
          var n = t.name
            , t = t.tag;
          if (n) {
              n = {
                  ev_type: "custom",
                  cm_name: n = s(n.toString) ? n.toString() : "",
                  cm_type: "count"
              };
              return t && (t = s(t.toString) ? t.toString() : "",
              n.cm_tag = t),
              {
                  name: "SentCustomCount",
                  type: "get",
                  event: n
              }
          }
      }({
          name: t,
          tag: n
      })
  }
  ,
  Yt.prototype.buildEmitSingleEvent = function(t) {
      t = E(t);
      if (t && (!t || t.event_name))
          return {
              name: this.name,
              type: "post",
              event: {
                  ev_type: "flexible",
                  flexible_data_list: [t]
              }
          }
  }
  ,
  Yt.monitorName = Wt,
  Yt);
  function Yt() {
      var o = this;
      this.name = Wt,
      this.callback = h,
      this.handOut = function() {
          for (var t = [], n = 0; n < arguments.length; n++)
              t[n] = arguments[n];
          var e = o.buildEvent.apply(o, c([], H(t), !1));
          o.callback(e)
      }
      ,
      this.buildEvent = function() {
          for (var t = [], n = 0; n < arguments.length; n++)
              t[n] = arguments[n];
          if ("sendCustomCountLog" === t[0])
              return o.buildCustomCountLog(t[1], t[2]);
          if ("sendCustomTimeLog" === t[0])
              return o.buildCustomTimeLog(t[1], t[2], t[3]);
          if ("send" === t[0]) {
              if ("count" === t[1])
                  return o.buildCustomCountLog(t[2].category, t[2].action);
              if ("timing" === t[1])
                  return o.buildCustomTimeLog(t[2].category, t[2].action, t[2].value)
          }
          if ("emit" === t[0] && t[1] && t[2]) {
              var e = {
                  type: t[1],
                  event: t[2]
              };
              return o.buildEmitSingleEvent(e)
          }
      }
      ,
      this.send = function(t, n, e) {
          var r = e.action
            , e = e.value;
          "count" === t && o.sendCustomCountLog(n, r),
          "timing" === t && o.sendCustomTimeLog(n, r, e)
      }
      ,
      this.sendCustomTimeLog = function(t, n, e) {
          e = o.buildCustomTimeLog(t, n, e);
          o.callback(e)
      }
      ,
      this.sendCustomCountLog = function(t, n) {
          n = o.buildCustomCountLog(t, n);
          return o.callback(n),
          n
      }
      ,
      this.emitEvent = function(t) {
          t = o.buildEmitSingleEvent(t);
          o.callback(t)
      }
  }
  function Kt(o) {
      function i(n, e) {
          var r;
          return function(t) {
              a = void 0,
              t && r !== t && e({
                  event: r = t,
                  name: n
              })
          }
      }
      var a;
      return [i, function(r) {
          return function(t) {
              var n;
              try {
                  n = t.target
              } catch (t) {
                  return
              }
              var e = n && n.tagName;
              e && ("INPUT" === e || "TEXTAREA" === e || n.isContentEditable) && (a || i("input", r)(t),
              clearTimeout(a),
              a = window.setTimeout(function() {
                  a = void 0
              }, o))
          }
      }
      ]
  }
  function Zt(n, e) {
      return function(t) {
          if (e)
              try {
                  n(t)
              } catch (t) {}
      }
  }
  function $t(t) {
      if (t = t.error)
          return t
  }
  function tn(t) {
      var n;
      try {
          "reason"in t ? n = t.reason : "detail"in t && "reason"in t.detail && (n = t.detail.reason)
      } catch (t) {}
      if (n)
          return n
  }
  function nn(e, r) {
      return function(t) {
          if (function(t) {
              switch (Object.prototype.toString.call(t)) {
              case "[object Error]":
              case "[object Exception]":
              case "[object DOMError]":
              case "[object DOMException]":
                  return 1;
              default:
                  return t instanceof Error
              }
          }(t))
              n = t;
          else {
              if ("[object Object]" === o(t) || f(t))
                  try {
                      n = {
                          message: JSON.stringify(t)
                      }
                  } catch (t) {}
              l(t) && (n = {
                  message: t
              })
          }
          if (n) {
              var n = {
                  ev_type: "js_exception",
                  exception: an(n),
                  release: e,
                  breadcrumbs: r()
              };
              return {
                  name: on,
                  type: "post",
                  event: n
              }
          }
      }
  }
  var en = function(n, e, t, r) {
      var i = (o.prototype.setup = function(t) {
          this.monitor = W(e, this.props, t, r)
      }
      ,
      o.monitorName = n,
      o);
      function o(t) {
          this.props = t,
          this.name = n
      }
      return t.forEach(function(t, o) {
          return i.prototype[t] = function() {
              for (var t, n, e = [], r = 0; r < arguments.length; r++)
                  e[r] = arguments[r];
              return null === (n = null === (t = this.monitor) || void 0 === t ? void 0 : t[o]) || void 0 === n ? void 0 : n.call.apply(n, c([t], H(e), !1))
          }
      }),
      i
  }
    , rn = en("BreadcrumbMonitor", function(i) {
      return void 0 === i && (i = k()),
      function(t) {
          var e, n = H(Kt(100), 2), r = n[0], o = n[1], n = H(function(n) {
              void 0 === n && (n = 20);
              var e = [];
              return [function() {
                  return e
              }
              , function(t) {
                  t = D(D({}, t), {
                      timestamp: g()
                  });
                  e = 0 <= n ? c(c([], H(e), !1), [t], !1).slice(-n) : c(c([], H(e), !1), [t], !1)
              }
              ]
          }(t.maxBreadcrumbs), 2), t = n[0], n = n[1], n = (e = n,
          function(t) {
              var n;
              try {
                  n = t.event.target ? L(t.event.target) : L(t.event)
              } catch (t) {
                  n = "<unknown>"
              }
              0 !== n.length && e({
                  category: "ui." + t.name,
                  message: n
              })
          }
          );
          return i && (i.addEventListener("click", r("click", Zt(n, "dom"))),
          i.addEventListener("keypress", o(Zt(n, "dom")))),
          [t]
      }
  }, ["getBreadcrumbs"])
    , on = "JSExceptionMonitor"
    , an = function(t) {
      return {
          message: t.message,
          name: t.name,
          fileName: t.fileName,
          lineNumber: t.lineNumber,
          columnNumber: t.columnNumber,
          stack: t.stack,
          stacktrace: t.stacktrace,
          framesToPop: t.framesToPop
      }
  }
    , un = en(on, function(a) {
      return void 0 === a && (a = T()),
      function(t, e) {
          var n = t.getBreadcrumbs
            , r = t.enableCatchGlobalJSError
            , o = t.catchUnhandledRejection
            , o = void 0 === o || o
            , t = t.release
            , i = nn(void 0 === t ? "" : t, function() {
              return n && n() || []
          })
            , t = function(n) {
              return function(t) {
                  t = n(t),
                  t = t && i(t);
                  t && e && e(t)
              }
          };
          a && (void 0 !== r && !r || a.addEventListener("error", t($t)),
          o && a.addEventListener("unhandledrejection", t(tn)));
          return [function(t) {
              var n = null;
              return (n = "[object ErrorEvent]" === Object.prototype.toString.call(t) ? $t(t) : "[object PromiseRejectionEvent]" === Object.prototype.toString.call(t) ? tn(t) : t) && i(n)
          }
          ]
      }
  }, ["buildEvent"])
    , sn = en(Ot, function(J) {
      return void 0 === J && (J = C()),
      function(t, s) {
          var e, r, n, o = t.prePerformanceObserver, i = t.TTIMonitor, c = t.renderType, a = t.report, l = t.fmpMonitor, t = t.performanceAuto, u = void 0 === t || t, f = D({}, Nt), m = i || Y, d = 0, v = "", p = !0, h = 0, g = null, t = {
              isAsync: 0,
              prePerformanceObserver: o
          }, i = H(St(f), 3), y = i[0], b = i[1], w = i[2], S = H(K(J), 2)[1], i = H((e = s,
          r = !1,
          [function() {
              return r
          }
          , function(t, n) {
              if (!t) {
                  if (r)
                      return;
                  r = !0
              }
              e && e(n)
          }
          ]), 2), E = i[0], L = i[1], M = (n = !1,
          U(function() {
              return n = !0
          }),
          function() {
              return n
          }
          ), T = H(W(wt), 1)[0], _ = H(W(yt, t), 1)[0], k = H(W(gt, {
              prePerformanceObserver: o
          }, function(t) {
              t = t.lcp;
              return y({
                  lcp: t
              })
          }), 1)[0], C = G(function(t) {
              return t.fid
          }), R = H(W(ht, 0, C), 1)[0], P = G(q), A = H(W(bt, 0, P), 1)[0], x = G(function(t) {
              if (t && 0 < t)
                  return Math.max(Math.round(t - d), 0)
          }), t = H(W(m, t), 4), N = t[0], O = t[3], j = V(x), I = function(t) {
              if (clearTimeout(h),
              h = 0,
              s) {
                  p = !1;
                  var n = f.isAsync;
                  w(f);
                  var e = _().mpfid
                    , r = T()
                    , o = r && r.event.resources
                    , i = H(K(J), 3)
                    , a = function(t, n) {
                      if (t && n) {
                          var e = t.domainLookupEnd
                            , r = t.domainLookupStart
                            , o = t.connectEnd
                            , i = t.connectStart
                            , a = t.responseEnd
                            , u = t.responseStart
                            , s = t.requestStart
                            , c = t.domComplete
                            , l = t.domLoading
                            , f = t.domInteractive
                            , m = t.navigationStart
                            , d = t.loadEventEnd
                            , v = t.loadEventStart
                            , p = t.secureConnectionStart
                            , s = {
                              dns: e - r,
                              tcp: o - i,
                              request: u - s,
                              response: a - u,
                              processing: c - l,
                              blank: a - m,
                              domready: f - m,
                              load: d - m,
                              domparse: f - a,
                              resource: v - t.domContentLoadedEventEnd,
                              ttfb: u - s,
                              redirect: t.redirectEnd - t.redirectStart
                          };
                          p && (s.ssl = o - p);
                          n = n("navigation")[0];
                          return (n || t) && (s.navigation = n || t),
                          t && (s.timing = t),
                          n && (s.navigation_timing = n),
                          s
                      }
                  }(i[0], i[2])
                    , r = function(t, n, e, r) {
                      if (!t)
                          return 0;
                      var o = H(t, 3)
                        , i = o[0]
                        , t = o[1]
                        , a = o[2];
                      if (i(),
                      n)
                          return t().event.fmp || 0;
                      try {
                          return Q([[z(1), function() {
                              return a().event.fmp
                          }
                          ], [z(2), function() {
                              return r()
                          }
                          ]])(e) || 0
                      } catch (t) {
                          return 0
                      }
                  }(l, n, c, function() {
                      return A().fcp
                  })
                    , i = k().lcp;
                  y(A()),
                  y(D(D(D({}, f), a), {
                      mpfid: e,
                      resources: o,
                      has_resource: o ? 1 : 0,
                      fmp: r,
                      lcp: i
                  })),
                  f.load && y({
                      load: f.load
                  }),
                  n || null !== (i = null == a ? void 0 : a.timing) && void 0 !== i && i.loadEventEnd || 0 !== (null === (a = null == a ? void 0 : a.timing) || void 0 === a ? void 0 : a.loadEventEnd) || y({
                      bounced: !0
                  });
                  var u = function() {
                      g = null,
                      L(n, b())
                  };
                  if (g = function() {
                      y({
                          fid: R()
                      }),
                      y(A()),
                      O && y({
                          tti: Math.round(O() - d)
                      }),
                      u()
                  }
                  ,
                  C.then(function(t) {
                      return y({
                          fid: t
                      })
                  }),
                  P.then(y),
                  x.then(function(t) {
                      return y({
                          tti: t
                      })
                  }),
                  t)
                      return y(A()),
                      k && y(k()),
                      u();
                  N && N(x),
                  j.then(function() {
                      return setTimeout(u)
                  })
              }
          };
          U(function() {
              return u && (h = setTimeout(I, 200))
          }),
          B(function() {
              u && !E() && (I(!0),
              a && a())
          });
          var F = function() {
              u = !1,
              clearTimeout(h),
              h = 0
          };
          return [function(t) {
              void 0 === t && (t = ""),
              g ? g() : !h && E() || (M() || F(),
              I(),
              g()),
              f.isAsync = 1,
              n = H(St(f), 3),
              y = n[0],
              b = n[1],
              w = n[2],
              p = !0,
              d = Math.round(S()),
              v = t;
              var n = {
                  isAsync: 1,
                  prePerformanceObserver: o
              }
                , t = H(W(wt, n), 1);
              T = t[0],
              t = H(W(yt, n), 1),
              _ = t[0],
              n = H(W(m, D(D({}, n), {
                  minValue: d
              })), 4),
              N = n[0],
              O = n[3],
              x = G(function(t) {
                  if (t && 0 < t)
                      return Math.max(Math.round(t - d), 0)
              });
              var e = {
                  fp: 0,
                  fcp: 0
              };
              A = function() {
                  return e
              }
              ,
              (P = G(q))(e),
              j = V(x),
              l = W(X)
          }
          , function() {
              p && M() && !h && (f.isAsync && (f.load = Math.round(S() - d),
              f.route_from = v),
              h = setTimeout(I, 200))
          }
          , function() {
              return j.resolved || I(!("complete" === document.readyState)),
              b()
          }
          , F]
      }
  }, ["initAsync", "send", "getPerformance", "stopAutoPerf"])
    , cn = en(It, function(o, i, a) {
      return void 0 === o && (o = T()),
      void 0 === i && (i = C()),
      void 0 === a && (a = null === location || void 0 === location ? void 0 : location.href),
      function(t, n) {
          var e = H(K(i), 3)[2]
            , r = function() {
              return e("resource")
          };
          return o && o.addEventListener("error", function(t) {
              t = Ft(r(), t, a || "");
              t && n && n(t)
          }, !0),
          [function(t) {
              return Ft(r(), t, a || "")
          }
          ]
      }
  }, ["buildEvent"])
    , ln = en(Ht, function(e, i, a) {
      if (void 0 === e && (e = T()),
      void 0 === i && (i = function() {
          if ("Promise"in window)
              return Promise
      }()),
      void 0 === a && (a = M()),
      e && a && i)
          return function(t, n) {
              var r, o, t = (r = Ut(n, t.onError, i, a),
              function(t) {
                  var n, e = t || o.event || {};
                  try {
                      n = e.target || e.srcElement || {}
                  } catch (e) {
                      return
                  }
                  Qt(n) && (t = qt(n),
                  n = (null === (n = n.tagName) || void 0 === n ? void 0 : n.toLowerCase()) || "",
                  t && n && t !== location.href && r(t))
              }
              );
              return (o = e).addEventListener("error", t, !0),
              [t]
          }
  }, ["staticSRIErrorLog"]);
  function fn(t, n) {
      return a(t) ? a(n) ? D(D({}, t), {
          overrides: n
      }) : t : {}
  }
  function mn(t, n) {
      var e;
      return t.forEach(function(t) {
          t.name === n && (e = t)
      }),
      e
  }
  var dn = function(r) {
      void 0 === r && (r = window);
      var o = 0;
      return {
          setSchedule: function(t, n) {
              var e = this;
              o = r.setTimeout(function() {
                  t(),
                  e.setSchedule(t, n)
              }, n)
          },
          clearSchedule: function() {
              r.clearTimeout(o)
          },
          getTimer: function() {
              return o
          }
      }
  }()
    , vn = "WorkerMonitor"
    , pn = (hn.prototype.setup = function() {
      s(window.Worker) && this.loadWorker()
  }
  ,
  hn.prototype.loadWorker = function() {
      var e = this;
      y.get(this.options.workerLink, {
          getResponseText: function(t) {
              var n;
              e.worker || (n = new Worker(window.URL.createObjectURL(new Blob([t],{
                  type: "text/javascript"
              }))),
              e.worker = n,
              document.addEventListener("visibilitychange", function() {
                  e.sendVisibilityChange({
                      worker: n,
                      visibilityState: document.visibilityState
                  })
              }),
              dn.setSchedule(function() {
                  e.heartBeat({
                      worker: n,
                      reportURL: e.options.reportURL,
                      commonParams: e.options.commonParams
                  })
              }, 2e3))
          }
      })
  }
  ,
  hn.prototype.sendVisibilityChange = function(t) {
      var n = t.worker
        , t = t.visibilityState;
      n.postMessage({
          type: "visibilityChange",
          visibilityState: t
      })
  }
  ,
  hn.prototype.heartBeat = function(t) {
      var n = t.worker
        , e = t.reportURL
        , t = t.commonParams;
      n.postMessage({
          type: "heartBeat",
          reportURL: e,
          commonParams: D(D({}, t || {}), {
              url: window.location.href
          }),
          breadcrumbs: null !== (e = null === (e = null === (t = null === (e = this.options) || void 0 === e ? void 0 : e.breadcrumbMonitor) || void 0 === t ? void 0 : t.getBreadcrumbs) || void 0 === e ? void 0 : e.call(t)) && void 0 !== e ? e : [],
          memory: null !== (e = null === (e = null === (t = this.options.memoryRecordMonitor) || void 0 === t ? void 0 : t.getMemoryQueue) || void 0 === e ? void 0 : e.call(t)) && void 0 !== e ? e : [],
          frames: null !== (t = null === (e = null === (t = this.options.fpsJankTimesMonitor) || void 0 === t ? void 0 : t.getHistoryFrameList) || void 0 === e ? void 0 : e.call(t)) && void 0 !== t ? t : []
      })
  }
  ,
  hn.monitorName = vn,
  hn);
  function hn(t) {
      this.name = vn,
      this.options = t,
      this.worker = null
  }
  var gn, yn, bn, wn, Sn, En, en = (Ln.prototype.setup = function() {
      var n = this;
      this.options.sendEvent && this.monitors.forEach(function(t) {
          (n.installedMonitors[t.name] = t).setup(n.options.sendEvent)
      })
  }
  ,
  Ln.version = "3.7.0",
  Ln);
  function Ln(t) {
      var o = this;
      this.getInstalledMonitors = function() {
          return o.installedMonitors
      }
      ,
      this.init = function() {
          var t, n = o.options.config;
          n.flags.enableStaticError && o.monitors.push(new cn),
          n.flags.enablePerformance && o.monitors.push(new sn({
              fmpMonitor: o.options.fmpMonitor,
              performanceAuto: n.commonParams.performanceAuto,
              renderType: n.monitors.BaseMonitor.appTypeSetting.renderType,
              report: function() {
                  return o.options.report()
              },
              prePerformanceObserver: {
                  precollect: null !== (t = null === (t = null === (t = window.Slardar) || void 0 === t ? void 0 : t.lt) || void 0 === t ? void 0 : t.e) && void 0 !== t ? t : [],
                  observer: null === (t = null === (t = window.Slardar) || void 0 === t ? void 0 : t.lt) || void 0 === t ? void 0 : t.o
              }
          })),
          n.flags.enableMemoryRecord && o.monitors.push(new Gt),
          n.flags.enableBreadcrumb && o.monitors.push(new rn),
          n.flags.enableFPSJankTimesMonitor && o.monitors.push(new vt({
              breadcrumbMonitor: mn(o.monitors, "BreadcrumbMonitor"),
              memoryRecordMonitor: mn(o.monitors, "MemoryRecordMonitor"),
              report: function() {
                  return o.options.report()
              }
          })),
          o.monitors.push(new Xt),
          n.flags.enableCatchJSErrorV2 && o.monitors.push(new un({
              enableCatchGlobalJSError: o.options.config.flags.enableCatchGlobalJSError,
              catchUnhandledRejection: n.flags.catchUnhandledRejectionV2,
              release: o.options.config.monitors.JSErrorMonitor.release,
              breadcrumbMonitor: mn(o.monitors, "BreadcrumbMonitor")
          })),
          o.monitors.push(new ln({
              onError: function(t) {
                  o.options.captureException(t)
              }
          })),
          n.flags.enableCrash && o.monitors.push(new pn({
              reportURL: n.commonParams.reportURLSingle,
              commonParams: n.commonParams,
              workerLink: "https://sf16-scmcdn-va.ibytedtos.com/goofy/slardar/fe/sdk/plugins/worker.3.7.0.maliva.js",
              breadcrumbMonitor: mn(o.monitors, "BreadcrumbMonitor"),
              memoryRecordMonitor: mn(o.monitors, "MemoryRecordMonitor"),
              fpsJankTimesMonitor: mn(o.monitors, "FPSJankTimesMonitor")
          })),
          o.setup(),
          o.handlePreCollect()
      }
      ,
      this.handlePreCollect = function() {
          var t = o.options.collect
            , n = null !== (n = null == t ? void 0 : t.emit) && void 0 !== n ? n : [];
          i(n) && (n.forEach(function(t) {
              var n, e;
              null != t && t.event && (n = t.event,
              e = t.params,
              t = fn(null === (t = mn(o.monitors, "EmitMonitor")) || void 0 === t ? void 0 : t.buildEvent.apply(t, c([], H(null != n ? n : {}), !1)), e),
              null !== (e = (n = o.options).sendEvent) && void 0 !== e && e.call(n, t))
          }),
          t.emit = []);
          var n = null !== (n = null == t ? void 0 : t.exception) && void 0 !== n ? n : [];
          i(n) && (n.forEach(function(t) {
              var n, e;
              t && t.exception && (n = t.exception,
              e = t.params,
              t = fn(null === (t = mn(o.monitors, "JSExceptionMonitor")) || void 0 === t ? void 0 : t.buildEvent(n), e),
              null !== (e = (n = o.options).sendEvent) && void 0 !== e && e.call(n, t))
          }),
          t.exception = []);
          n = null !== (n = null == t ? void 0 : t.staticError) && void 0 !== n ? n : [];
          i(n) && (n.forEach(function(t) {
              var n, e, r;
              null != t && t.event && (e = t.event,
              r = t.params,
              t = fn(null === (n = mn(o.monitors, "StaticErrorMonitor")) || void 0 === n ? void 0 : n.buildEvent(e || {}), r),
              null !== (r = (n = o.options).sendEvent) && void 0 !== r && r.call(n, t),
              null !== (t = mn(o.monitors, "StaticSRIErrorMonitor")) && void 0 !== t && t.staticSRIErrorLog(e))
          }),
          t.staticError = []),
          null !== (t = window.Slardar) && void 0 !== t && t.globalPreCollectError && (window.removeEventListener("error", window.Slardar.globalPreCollectError, !0),
          window.Slardar.globalPreCollectError = void 0)
      }
      ,
      this.options = t,
      this.monitors = [],
      this.installedMonitors = {}
  }
  return gn = {
      pluginName: "SetMonitors",
      version: en.version,
      plugin: en
  },
  window.__SLARDAR__ || (window.__SLARDAR__ = {}),
  window.__SLARDAR__ && ((wn = {
      version: yn = gn.plugin.version
  })[gn.pluginName] = gn.plugin,
  bn = wn,
  wn = null !== (wn = window.__SLARDAR__.plugins) && void 0 !== wn ? wn : [],
  En = !(Sn = []),
  wn.forEach(function(t) {
      t.version === yn && ("SetMonitors" !== gn.pluginName || t.SetMonitors || (t[gn.pluginName] = gn.plugin),
      "SetSentryMonitors" !== gn.pluginName || t.SetSentryMonitors || (t[gn.pluginName] = gn.plugin),
      "SetHeatmap" !== gn.pluginName || t.SetHeatmap || (t[gn.pluginName] = gn.plugin),
      "SetHeatmapDraw" !== gn.pluginName || t.SetHeatmapDraw || (t[gn.pluginName] = gn.plugin),
      "SetHeatmapMouseDraw" !== gn.pluginName || t.SetHeatmapMouseDraw || (t[gn.pluginName] = gn.plugin),
      "SetHeatmapScrollDraw" !== gn.pluginName || t.SetHeatmapScrollDraw || (t[gn.pluginName] = gn.plugin),
      En = !0),
      Sn.push(t)
  }),
  En || Sn.push(bn),
  window.__SLARDAR__.plugins = Sn),
  t.SetMonitors = en,
  Object.defineProperty(t, "__esModule", {
      value: !0
  }),
  t
}({});
